﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2023-03-19 19:30
    /// 描 述：抢单管理实体类
    /// </summary>
    [Table("car_prebook_order")]
    public class PrebookOrderEntity : BaseEntity
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string car_rental_addr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string car_return_addr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public int? car_renters_number { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? car_order_sn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? create_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? car_rental_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? car_return_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public int? status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string remark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string other_parts_data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string car_type_data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? car_bindid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? userid { get; set; }

        [NotMapped]
        public string nickname { get; set; }
        [NotMapped]
        public string brand_name { get; set; }
       
        public string telephone { get; set; }

        [NotMapped]
        public string usertelephone { get; set; }

        public int? type { get; set; }

        public string wx { get; set; }

        /// <summary>
        /// 预约门店id
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? PreBookShopId { get; set; }

        /// <summary>
        /// 预约门店名称
        /// </summary>
        public string PreBookShopName { get; set; }

        /// <summary>
        /// 预约车类型数据源
        /// </summary>
        public string PreBookCarTypes { get; set; }

        /// <summary>
        /// 预约车数量
        /// </summary>
        public int? PreBookCarNumber { get; set; }

        /// <summary>
        /// 车辆使用人平均身高
        /// </summary>
        public string? CarUsesPeopleAverageHeight{ get; set; }

        /// <summary>
        /// 车辆数据源
        /// </summary>
        public string CarData { get; set; }

        /// <summary>
        /// 预约取车时间
        /// </summary>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? PreBookCarReceiveTime { get; set; }

        /// <summary>
        /// 押金
        /// </summary>
        public double? DepositMoney { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 修改人iD
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? ModifyUserId { get; set; }

        /// <summary>
        /// 修改人姓名
        /// </summary>
        public string ModifyUserName { get; set; }

        /// <summary>
        /// 车辆详细信息
        /// </summary>
        [NotMapped]
        public ConcurrentList<CarPreBookDetail> CarList=new ConcurrentList<CarPreBookDetail>();

        public long? tenant_id { get; set; }
    }
}
